{% extends "base.html" %}
{% block mycontent %}
    <div class="container">
        <h4>意见反馈</h4>
        <hr>
    </div>

    <div class="container">
        {% if errmsg %}
            <div class="alert alert-danger" role="alert">{{ errmsg }}</div>
        {% endif %}
    </div>

    <div class="container">
        <form action="/sub_question" method="post">
            <div class="form-group">
                <label for="name">姓名：</label>
                {% if vs and 'name' in vs %}
                    <input type="text" class="form-control" name="name" placeholder="姓名" value="{{ vs['name'] }}">
                {% else %}
                    <input type="text" class="form-control" name="name" placeholder="姓名">
                {% endif %}
            </div>
            <div class="form-group">
                <label for="phone">手机：</label>
                {% if vs and 'phone' in vs %}
                    <input type="text" class="form-control" name="phone" placeholder="手机号码" value="{{ vs['phone'] }}">
                {% else %}
                    <input type="text" class="form-control" name="phone" placeholder="手机号码">
                {% endif %}
            </div>
            <div class="form-group">
                <label for="address">地址：</label>
                {% if vs and 'address' in vs %}
                    <input type="text" class="form-control" name="address" placeholder="地址" value="{{ vs['address'] }}">
                {% else %}
                    <input type="text" class="form-control" name="address" placeholder="地址">
                {% endif %}
            </div>
            <div class="form-group">
                <label for="booktime">预约时间：</label>
                {% if vs and 'booktime' in vs %}
                    <input type="text" class="form-control" name="booktime" placeholder="预约时间" value="{{ vs['booktime'] }}">
                {% else %}
                    <input type="text" class="form-control" name="booktime" placeholder="预约时间">
                {% endif %}
            </div>
            <div class="form-group">
                <label for="serviceType">服务类型：</label>
                <label class="radio-inline">
                    {% if 'serviceType' in vs and vs['serviceType'] == 'wx' %}
                        <input type="radio" name="serviceType" id="inlineRadio1" value="wx" checked> 维修
                    {% else %}
                        <input type="radio" name="serviceType" id="inlineRadio1" value="wx"> 维修
                    {% endif %}
                </label>
                <label class="radio-inline">
                    {% if 'serviceType' in vs and vs['serviceType'] == 'by' %}
                        <input type="radio" name="serviceType" id="inlineRadio1" value="by" checked> 保养
                    {% else %}
                        <input type="radio" name="serviceType" id="inlineRadio1" value="by"> 保养
                    {% endif %}
                </label>
                <label class="radio-inline">
                    {% if 'serviceType' in vs and vs['serviceType'] == 'cz' %}
                        <input type="radio" name="serviceType" id="inlineRadio1" value="cz" checked> 拆装
                    {% else %}
                        <input type="radio" name="serviceType" id="inlineRadio1" value="cz"> 拆装
                    {% endif %}
                </label>
            </div>
            <div class="form-group">
                <label for="title">简要说明：</label>
                {% if vs and 'title' in vs %}
                    <input type="text" class="form-control" name="title" placeholder="请简要说明问题，例如：沙发保养" value="{{ vs['title'] }}">
                {% else %}
                    <input type="text" class="form-control" name="title" placeholder="请简要说明问题，例如：沙发保养">
                {% endif %}
            </div>
            <div class="form-group">
                <label for="content">具体描述：</label>
                {% if vs and 'content' in vs %}
                    <textarea class="form-control" rows="3" name="content" placeholder="请详细描述所需要的服务">{{ vs['content'] }}</textarea>
                {% else %}
                    <textarea class="form-control" rows="3" name="content" placeholder="请详细描述所需要的服务"></textarea>
                {% endif %}
            </div>
            <button type="submit" class="btn btn-success" style="width:100%">提交</button>
        </form>
    </div>
{% endblock %}